package com.yigerende.feign;

import com.yigerende.pojo.TUser;
import com.yigerende.pojo.UserVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "WM-USER")
public interface UserFeign {

    @GetMapping("user/findAll/{page}/{limit}")
    UserVo findAll(@PathVariable("page") int page, @PathVariable("limit") int limit);

    @PostMapping("user/save")
    int save(@RequestBody TUser tUser);

    @GetMapping("user/deleteById/{id}")
    int deleteById(@PathVariable("id") Integer id);
}
